﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false"  CodeBehind="JYJLEdit.aspx.cs" Inherits="GPCSC.Web.sjsbyes.JYJLEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register assembly="NickLee.Web.UI" namespace="NickLee.Web.UI" tagprefix="NickLee" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
        <title>淮安市领导干部下基层活动网站</title>
<meta name="KEYWords" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
<meta name="DEscription" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
    <link type="text/css" rel="Stylesheet" href="../Css/GridCss.css" />
     <link type="text/css" rel="Stylesheet" href="../Css/selectCss.css" />
     <link href="../Css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../scripts/jquery-1.6.2.min.js"></script>
   <script type ="text/javascript" src ="../scripts/datepicker/WdatePicker.js"></script>
   <link rel="stylesheet" href="../Scripts/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="../Scripts/kindeditor/plugins/code/prettify.css" />
	<script type="text/javascript" charset="utf-8" src="../Scripts/kindeditor/kindeditor.js"></script>
	<script type="text/javascript" charset="utf-8" src="../Scripts/kindeditor/lang/zh_CN.js"></script>
	<script type="text/javascript" charset="utf-8" src="../Scripts/kindeditor/plugins/code/prettify.js"></script>

<script type="text/javascript" src="../Scripts/validator/jquery.validate.min.js"></script>
<script type="text/javascript" src="../Scripts/validator/messages_cn.js"></script>

<link type="text/css" href="../Scripts/uploadify/uploadify.css" rel="Stylesheet" />
<script type="text/javascript" charset="utf-8"  src="../Scripts/uploadify/swfobject.js"></script>
<script type="text/javascript" charset="utf-8"  src="../Scripts/uploadify/jquery.uploadify.v2.1.0.min.js"></script>

    <style>
    #Griddiv1
{
	width:40%;
	height:20px;
	float:left;
	text-align:left;
	vertical-align:middle;
}
#Griddiv2
{
	float:left;
	height:20px;
	width:50%;
	text-align:right;
	vertical-align:middle;
}
#Griddiv2 a
{
	padding-right:5px;
}
	.text2
	{
	    font-size:14px;
		color:#055586;
		font-family:"宋体";
		font-weight:bold;
	 }
	 
	
	 
</style>
	<script>

	    $(document).ready(

       function () {

           $('#fileupload').uploadify({
               'uploader': '../Scripts/uploadify/uploadify.swf',
               'cancelImg': '../Scripts/uploadify/cancel.png',
               'script': '../UPLoadHandler.ashx?newsid=' + $('#newfileid').val(),
               'folder': '../uploadfile',
               'queueID': 'fileQueue',
               'multi': true,
               'auto': false,
               'buttonImg': '../Images/fileup.gif',
               'buttonText': '上传附件',
               'onAllComplete': function (event, data) {

                   if (data.errors == 0) {
                       alert("文件上传成功！");
                   }
                   else {
                       alert("有" + data.errors + "个文件上传失败！");
                   }
                   LCallBack.Callback();
               }






           });

           $('#form1').validate({

       });
   }
       );

	    KindEditor.ready(function (K) {
	        var editor1 = K.create('#content1', {
	            cssPath: '../plugins/code/prettify.css',
	            uploadJson: '../Scripts/kindeditor/asp.net/upload_json.ashx',
	            fileManagerJson: '../Scripts/kindeditor/asp.net/file_manager_json.ashx',
	            allowFileManager: true,
	            afterCreate: function () {
	                var self = this;
	                K.ctrl(document, 13, function () {
	                    self.sync();
	                    K('form[name=example]')[0].submit();
	                });
	                K.ctrl(self.edit.doc, 13, function () {
	                    self.sync();
	                    K('form[name=example]')[0].submit();
	                });
	            }
	        });
	        prettyPrint();
	    });

	    function LCallBack_onCallbackError() {

	        alert("callback异常！");

	    }
	    function del(fileid) {
	        LCallBack.Callback("del", fileid);
	    }
	</script>

</head>
<body>
    <form id="form1" runat="server">

    <div >
    <!--导航-->

  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="29" background="../images/1.gif"><table width="300" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="300" class="tittle">当前位置：添加经验交流界面</td>
      </tr>
    </table></td>
    <td align="right" background="../images/1.gif" style="padding-right:20px;">
    <a href="JYJLList.aspx" class="returna">
        返回    
    </a>
    </td>
  </tr>
</table>
<!--标题-->
<%--    <div style="margin-top:20px; float:none;">
    <div style="text-align:left; width:50%;  height:50px; vertical-align:bottom; ">
    <img src="../Images/right2.gif" />
    <strong style="color:#0F5A8C">网站后台经验交流录入</strong>
    </div>
    </div>--%>



<!--录入模块-->
<div id="grid" class="grid" style=" margin:20px;"   >
    <table width="100%" >
        <tr>
        <td >
        标题：       
        </td>
        <td style=" text-align:left;">
        <input type ="text" id="title" runat="server"   />
        </td>
        </tr>
        <tr>
        <td>
        发布时间：
        </td>
        <td>
          <div style="float:left;"> 
                                     <input type="text" id="MtxtD_R_SD1_K" runat="server" /></div>
                                        <div style="float:left;">
                                         <img  style="margin-bottom:0px;"  src="../Images/calendar.gif"  onclick="WdatePicker({el:'MtxtD_R_SD1_K'})"/>
                                      
                                       </div>   
                               
        </td>
        </tr>
         <%--<tr>
        <td>
        新闻栏目：
        </td>
        <td style=" text-align:left">
        <select id="ddlRegType" runat="server" onchange="selects()">
        <option value="1" selected="selected">
        通知公告
        </option>
                <option value="2">
        工作动态
        </option>
        <option value="3">
        经验交流
        </option>
        <option value="4">
        调研报告
        </option>
         <option value="5">
        工作简报
        </option>
        </select>
        <div id="sds" style=" display:none">

       是否是图片新闻：
       <input type="radio" id="radio1" runat="server"  name="sd" onclick="shdetd()" />是
       <input type="radio" id="radio2" runat="server" name="sd"  onclick="shdetd()"/>否
        
        
        </div>
        

        </td>
        </tr>--%>

                <tr>
        <td>
        新闻作者：
        </td>
        <td style=" text-align:left;">
        <input type ="text" id="newsZZ" runat="server"  class="required" />
        </td>
        </tr>
         <tr>
        <td>
        所属单位
        </td>
        <td style=" text-align:left;">

            <asp:DropDownList ID="DropDownList1" runat="server" DataTextField="POSTNAME" 

DataValueField="CL_POST_SOID">
            </asp:DropDownList>
        </td>
        </tr>
        <tr>
        <td>
        内容：
        </td>
        <td>
         <textarea id="content1" runat="server" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;"  ></textarea>
        </td>
        </tr>
        <tr>
        <td >
        <div id="fileQueue">
        
        </div>
        <input id="fileupload" type="file" name="fileupload" />
        <input type="text"  runat="server" id="newfileid" style=" display:none" value="" />
        <input type="text"  runat="server" id="newfileids" style=" display:none" value=""  />
        <p>
      <a href="javascript:$('#fileupload').uploadifyUpload()">上传</a>| 
      <a href="javascript:$('#fileupload').uploadifyClearQueue()">取消上传</a>
    </p>

        </td>
        <td>
            <nicklee:CallBack runat="server" ID="LCallBack" OnCallback="LCallBack_Callback" PostState="True"
            Width="100%" Height="100%" 
            LoadingPanelFadeDuration="800" LoadingPanelFadeMaximumOpacity="80">
            <Content>
                <asp:Panel ID="Panel1" runat="server">
                <div id="Div1" class="grid" >
                    <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                    
                        <table width="100%" >
                                <tr height="26px" >
<%--                                <td  width="13%" group="firhe">
                               请选择首图片
                               
                                </td>--%>
                                <td  wiidth="45%" >
                                附件名称
                                </td>
                               
                                <td colspan="2" width="37%">
                                操作
                                </td>
                                </tr>
                    </HeaderTemplate>
                    
                    <ItemTemplate>
                    <tr>
<%--                        <td group="firhe">
                          <%# DataBinder.Eval(Container.DataItem, "tdhead")%>
                        </td>--%>
                        <td>
                        <%# DataBinder.Eval(Container.DataItem, "YfileName")%>
                        </td>
                        
                         <td style=" cursor:pointer"  onclick="window.open('../<%# DataBinder.Eval(Container.DataItem, "fileUrl")%>')">

                        [查看]
                        </td>
                        
                        <td  style=" cursor:pointer;" onclick="del('<%# DataBinder.Eval(Container.DataItem, "NewsfilesId")%>')">

                        [删除]
                        </td>
                        </tr>
                    
                    </ItemTemplate>
                    <FooterTemplate>
                    <!--分页-->
                        <tr>
                        <td colspan="4"  height="20px" style="background-color:#F9FDFE">
                        <div runat="server" id="pageInfo"></div>	

                        </td>
                        </tr>

                        </table>
                    
                    </FooterTemplate>



</asp:Repeater>
</div>
                </asp:Panel>
            </Content>
            <ClientEvents>
         <%-- <CallbackComplete EventHandler="LCallBack_onCallbackComplete" />--%>
                <CallbackError EventHandler="LCallBack_onCallbackError" />
            </ClientEvents>
            <LoadingPanelClientTemplate>
                <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0" border="0"
                    bgcolor="#e0e0e0">
                    <tr style="width: 100%; height: 100%;">
                        <td style="width: 100%; height: 100%; vertical-align: middle; text-align: center;">
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        数据载入中...&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        <img alt="" src="../images/GreenBar.gif" border="0" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
           </LoadingPanelClientTemplate>
         </nicklee:CallBack>
        </td>
        </tr>
        <tr>
        
        <td  colspan="2" align ="left">

            <asp:Button ID="Button1" runat="server"  onclick="Button1_Click" Text="提交" CssClass="buttonCss" />
        </td>
   
        
        
      
        </tr>

</table>
</div>
    </div>
    </form>
</body>
</html>